The present invention relates to data transfer apparatus and method in which data which was processed in parallel is distributed and transferred to other parallel units at a high speed via FIFO memories and, more particularly, to data transfer apparatus and method for detecting errors when drawing data which was processed in parallel by a three-dimensional graphics apparatus or the like is distributed and transferred at a high speed via FIFO memories.
In the 3-dimensional graphics display apparatus, to execute processes at a high speed, the processing stage is divided into a figure process by a software and a drawing process by a hardware and the processes are, further, executed in parallel. When there is an error in the result of the figure process by the software, however, the drawing process is not correctly performed, so that there is a case where the apparatus enters a runaway state and not only no data can be displayed but also the occurrence of an abnormality cannot be recognized. It is required to avoid such a situation as much as possible.
FIG. 1 schematically shows a conventional 3-dimensional graphics display apparatus. A figure processing section 200 executes geometrical conversion such as coordinates calculation, clipping, color calculation, and the like, drawing pre-processes of formation of line segments, and drawing processes such as line segment drawing and hidden image erasure to figure data constructing a three-dimensional model that is obtained from a memory 202 and comprises a set of polygons, thereby forming 3-dimensional image data when it is seen from a visual point. The figure processing section 200 executes in parallel the geometrical conversion, drawing pre-processes, and drawing processes to the figure data by a pipeline construction. The drawing data obtained in parallel by such a series of figure processes is transferred in parallel to a drawing processing section 220 through a parallel distributing mechanism which is constructed by input FIFO memories 214-1 to 214-n, an input/output (I/O) selecting section 216, and output FIFO units 218-1 to 218-n. On the basis of the drawing data transferred, the drawing processing section 220 executes in parallel interpolating calculations of pixels which are arranged between the start point and the end point of a line segment and performs a mapping process into a frame buffer 222. After completion of the mapping process, image data is displayed on a CRT 224 or the like.
FIG. 2 shows 2-dimensional drawing data indicative of a triangular polygon in a 3-dimensional space. Since the triangular polygon constructing a 3-dimensional model is a set of vertex data, it is expressed as a set of line segment data (span data) in the direction of an X axis by processes by the figure processing section 200 as shown in FIG. 3. Each span data is expressed by a set of a command and parameters. In this case, a fact that a line is a line segment is indicated by a command ID. A Y coordinate of the line segment, X coordinates of the start point and end point, a position (depth) in the direction of a Z axis of the start point, a concentration of each color of red, green, and blue at the start point, and an increased amount value per one pixel which is developed on the line segment by an interpolating calculation are shown as parameters. One unit which is data transferred is defined as one word. One word consists of, for example, 32 bits. The line segment data consists of, for instance, 10 words.
The figure processing section 200 in FIG. 1 obtains in parallel the line segment data including a command and parameters shown in FIG. 3 on a polygon unit basis and transfers to the drawing processing section 220 through a parallel data distributing mechanism using FIFO memories. The drawing processing section 220 must correctly extract the command and parameters from the transferred drawing data. FIGS. 4A and 5A show the case where data has correctly been transferred to the drawing processing section 220. Since the first word that is taken out from the FIFO memory on the output side includes the command ID, it is interpreted as a command A. In this case, as for a format of the data subsequent to the command A, since it will be understood that three parameter words continue, data is set into necessary registers while sequentially accepting parameters 1, 2, and 3. After the necessary number of parameters were received, it is possible to decide that the data to be read next is a command B. A format in which the number of parameters subsequent to the command is previously included in the command word is also considered. The drawing processing section 220 first receives the command and interprets a part of the command and counts the number of read data while setting the subsequent parameters into the necessary registers. When the designated number of parameters coincides with the count value, it is possible to recognize that the next data is a command. In a manner similar to the above, the drawing processing section 220 sequentially discriminates the command and the parameters subsequent to them and writes the data into the registers and performs the drawing process by interpolating calculations.
FIGS. 4B and 5B show the case where an abnormality occurred in a part of the transfer data due to some reasons. First, in FIG. 4B, surplus dust data is added between the parameter 1 subsequent to the command A and the parameter 3. Since the command A ought to have three parameters, the drawing processing section 220 interprets the parameters 1 and 2 and the dust as parameters and finishes the processes of the command A. The drawing processing section 220 interprets the parameter 3 as a next command. In FIG. 5B, the command A is deformed and changed to another command X. For example, when it is now assumed that the parameters of the command X have four words, the drawing processing section interprets that the commands up to the command word of the next command B as parameters. The parameter 1 of the command B is interpreted as a next command.
Now, assuming that the portions of the parameters were merely changed, a part of the line segment of the triangular polygon is merely lost. Therefore, such a state doesn't cause a large problem from a viewpoint of the image display. However, in the case where an abnormality occurred in the command portion as shown in FIGS. 4B and 5B, the subsequent data train cannot be interpreted. What is called a runaway state of the drawing processing section 220 such that it is also difficult to recover the drawing operation occurs. Such an abnormality of the transfer data mainly occurs due to a program error of the figure processing section 200 at the front stage. In this case, however, the processor of the figure processing section 200 cannot recognize such an abnormality and cannot execute an error recovering process.
On the other hand, so long as the apparatus has a function to separate the command portion on the side of the drawing processing section 220, the abnormality can be recognized. An error can be notified to the figure processing section 200. Further, the drawing process can be again executed. FIG. 6 shows an example of a data format in which the command and parameters of the transfer data can be discriminated on the side of the drawing processing section 220. The most significant bit of each word is allocated to an ID bit. In case of a command, the most significant bit (MSB) is set to 1. In case of a parameter, the MSB is set to 0. However, in the case where a special bit in one word is allocated as a bit to distinguish the command and the parameters, there is a drawback such that an amount of information which can be expressed by the command and parameters is limited.
On the other hand, in general, there is a possibility such that errors certainly occur in data due to the existence of a transfer medium in not only the 3-dimensional graphics display apparatus but also the transfer of digital data. Therefore, there is used a method whereby redundant code bits having a regularity are ordinarily added to data to be transferred, such a regularity is checked on the reception side, and when there is an abnormality in the regularity, it is decided that the transfer data includes an error, and a retransfer is requested to the transferring side.
Hitherto, as a method of detecting an error of the transfer data in a data bus, a method by a parity check as shown in FIG. 7 is generally known. That is, parity bits are added in accordance with a rule such that the total number of bits 1 included in the word to be transferred on the data transmission side is set to an even number. On the reception side, the parity bits are compared with the parity bits produced from the transferred word. When they don't coincide, it is decided that the transfer data is wrong. On the other hand, there is also a method whereby in the case where the total number of data 1 on the reception side is merely equal to an odd number, it is decided that the transfer data is wrong.
However, according to the bit error detection by the parity as mentioned above, although a bit error in one word can be detected, a loss of the word itself cannot be detected. FIG. 8 shows the case where one transfer group is constructed by six words and it is continuously transferred on a word unit basis. Parity bits are respectively added to six words on the data transmission side. For example, it is now assumed that the fourth word was lost on the reception side due to a trouble of the signal to control the transfer of the data bus. However, in this case, since it is determined that all of the parity bits are correct, the loss of word cannot be detected.
FIG. 9 shows a 2-dimensional data error detecting method whereby in order to detect the loss of data word, as well as the addition of the parity bits to each word, data indicative of the number of words to be transferred since now is added. That is, upper four bits of each word denotes the additional data to decide a communicating procedure to indicate the number of subsequent words or the command transfer data. Remaining lower four bits indicate the number of transfer words or the data. For example, all of the upper four bits of the first word are equal to 1, the first word indicates the additional data indicative of the number of words and shows that the number of subsequent transfer words is equal to 3 because it is expressed by 0011 as a binary number. In the three second to fourth words, all of the upper four bits are equal to 0 and the remaining four bits indicate the data to be inherently transferred. The parity bit is respectively added to each word.
FIG. 9 shows the case where the fourth word is lost on the reception side. In this case, the number of transfer words (=3) designated by the additional data of the first word doesn't coincide with the number of words up to the additional data indicative of the number of next transfer words. Therefore, it is decided that there is an error in the transfer data. As an inserting method of the additional data, there is also a method whereby data of a bit pattern in which a probability of occurrence is low is inserted once a predetermined number of times.
As another error detecting method regarding the loss of word itself, as shown in FIG. 10, there is also a method whereby the word numbers are also simultaneously transmitted. According to this method, for instance, the word number of three bits is added to each word and transmitted and a continuity of the word numbers is checked on the reception side, thereby knowing a loss of data. In FIG. 10, it will be understood on the reception side that the fourth word as a word number 100 was lost.
According to the conventional error detection by the parity check, however, it is an object to detect a bit error regarding one word to be transferred and the loss of word itself cannot be known. On the other hand, according to a method of deciding a communicating procedure that is effective to detection of the loss of word itself, in the case where the data is out of the rule of a predetermined procedure, an error can be certainly detected. However, large amount of vain transfer data for such a detection is needed. The above method is unsuitable to a high-speed data transfer circuit. Although the method of simultaneously transferring the word number is the most certain method, in case of applying such a method to the error detection of the data transfer on the data bus, a large number of transmission bits of the bus are necessary.